package com.example.demo.database

import com.example.featuresdk.database.DatabaseCallback

class DatabaseCallbackManager {

    private val callbacks = mutableListOf<DatabaseCallback>()

    fun register(callback: DatabaseCallback){
        callbacks.add(callback)
    }

    suspend fun initialize(){
        callbacks.sortBy {
            it.priority
        }

        callbacks.forEach {
            it.initialize()
        }
    }
}